<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: Prismic::Form
  
    &mdash; Documentation by YARD 0.8.7.4
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!Prismic/Form.html";
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (F)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span>
     &raquo; 
    <span class="title">Form</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: Prismic::Form
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">Prismic::Form</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/prismic/form.rb</dd>
  
</dl>
<div class="clear"></div>





  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#action-instance_method" title="#action (instance method)">- (Object) <strong>action</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the value of attribute action.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#enctype-instance_method" title="#enctype (instance method)">- (Object) <strong>enctype</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the value of attribute enctype.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#fields-instance_method" title="#fields (instance method)">- (Object) <strong>fields</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the value of attribute fields.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#form_method-instance_method" title="#form_method (instance method)">- (Object) <strong>form_method</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the value of attribute form_method.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the value of attribute name.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#rel-instance_method" title="#rel (instance method)">- (Object) <strong>rel</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the value of attribute rel.</p>
</div></span>
  
</li>

    
  </ul>




  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#from_json-class_method" title="from_json (class method)">+ (Object) <strong>from_json</strong>(api, json) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#create_search_form-instance_method" title="#create_search_form (instance method)">- (Object) <strong>create_search_form</strong>(data = {}, ref = nil) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#default_data-instance_method" title="#default_data (instance method)">- (Object) <strong>default_data</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (Form) <strong>initialize</strong>(api, name, fields, form_method, rel, enctype, action) </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>A new instance of Form.</p>
</div></span>
  
</li>

      
    </ul>
  

<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="Prismic::Form (class)">Form</a></span></tt>) <strong>initialize</strong>(api, name, fields, form_method, rel, enctype, action) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns a new instance of Form</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


6
7
8
9
10
11
12
13
14</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 6</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_api'>api</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_fields'>fields</span><span class='comma'>,</span> <span class='id identifier rubyid_form_method'>form_method</span><span class='comma'>,</span> <span class='id identifier rubyid_rel'>rel</span><span class='comma'>,</span> <span class='id identifier rubyid_enctype'>enctype</span><span class='comma'>,</span> <span class='id identifier rubyid_action'>action</span><span class='rparen'>)</span>
  <span class='ivar'>@api</span> <span class='op'>=</span> <span class='id identifier rubyid_api'>api</span>
  <span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span>
  <span class='ivar'>@fields</span> <span class='op'>=</span> <span class='id identifier rubyid_fields'>fields</span>
  <span class='ivar'>@form_method</span> <span class='op'>=</span> <span class='id identifier rubyid_form_method'>form_method</span>
  <span class='ivar'>@rel</span> <span class='op'>=</span> <span class='id identifier rubyid_rel'>rel</span>
  <span class='ivar'>@enctype</span> <span class='op'>=</span> <span class='id identifier rubyid_enctype'>enctype</span>
  <span class='ivar'>@action</span> <span class='op'>=</span> <span class='id identifier rubyid_action'>action</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="action=-instance_method"></span>
      <div class="method_details first">
  <h3 class="signature first" id="action-instance_method">
  
    - (<tt>Object</tt>) <strong>action</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the value of attribute action</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 4</span>

<span class='kw'>def</span> <span class='id identifier rubyid_action'>action</span>
  <span class='ivar'>@action</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="enctype=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="enctype-instance_method">
  
    - (<tt>Object</tt>) <strong>enctype</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the value of attribute enctype</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 4</span>

<span class='kw'>def</span> <span class='id identifier rubyid_enctype'>enctype</span>
  <span class='ivar'>@enctype</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="fields=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="fields-instance_method">
  
    - (<tt>Object</tt>) <strong>fields</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the value of attribute fields</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 4</span>

<span class='kw'>def</span> <span class='id identifier rubyid_fields'>fields</span>
  <span class='ivar'>@fields</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="form_method=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="form_method-instance_method">
  
    - (<tt>Object</tt>) <strong>form_method</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the value of attribute form_method</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 4</span>

<span class='kw'>def</span> <span class='id identifier rubyid_form_method'>form_method</span>
  <span class='ivar'>@form_method</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="name=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="name-instance_method">
  
    - (<tt>Object</tt>) <strong>name</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the value of attribute name</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 4</span>

<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
  <span class='ivar'>@name</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="rel=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="rel-instance_method">
  
    - (<tt>Object</tt>) <strong>rel</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the value of attribute rel</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


4
5
6</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 4</span>

<span class='kw'>def</span> <span class='id identifier rubyid_rel'>rel</span>
  <span class='ivar'>@rel</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="from_json-class_method">
  
    + (<tt>Object</tt>) <strong>from_json</strong>(api, json) 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


24
25
26
27
28
29
30
31
32
33
34
35
36</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 24</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_from_json'>from_json</span><span class='lparen'>(</span><span class='id identifier rubyid_api'>api</span><span class='comma'>,</span> <span class='id identifier rubyid_json'>json</span><span class='rparen'>)</span>
  <span class='const'>Form</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
      <span class='id identifier rubyid_api'>api</span><span class='comma'>,</span>
      <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>name</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
      <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>fields</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_k2'>k2</span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</span><span class='op'>|</span>
        <span class='lbracket'>[</span><span class='id identifier rubyid_k2'>k2</span><span class='comma'>,</span> <span class='const'>Field</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_field'>field</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>type</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>default</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_k2'>k2</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>q</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rbracket'>]</span>
      <span class='rbrace'>}</span><span class='rbracket'>]</span><span class='comma'>,</span>
      <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>method</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
      <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>rel</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
      <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>enctype</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
      <span class='id identifier rubyid_json'>json</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>action</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
  <span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="create_search_form-instance_method">
  
    - (<tt>Object</tt>) <strong>create_search_form</strong>(data = {}, ref = nil) 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


20
21
22</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 20</span>

<span class='kw'>def</span> <span class='id identifier rubyid_create_search_form'>create_search_form</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_ref'>ref</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
  <span class='const'>SearchForm</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@api</span><span class='comma'>,</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_ref'>ref</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="default_data-instance_method">
  
    - (<tt>Object</tt>) <strong>default_data</strong> 
  

  

  
</h3><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


16
17
18</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic/form.rb', line 16</span>

<span class='kw'>def</span> <span class='id identifier rubyid_default_data'>default_data</span>
  <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_fields'>fields</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_field'>field</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_field'>field</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Tue Sep 27 10:47:06 2016 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.4 (ruby-2.0.0).
</div>

  </body>
</html>